export const preventReClick = {
    mounted(el, binding) {
        el.addEventListener("click", () => {
            if (!el.disabled) {
                el.disabled = true;
                el.style.cursor = "not-allowed";
                el.classList.add("is-disabled");

                setTimeout(() => {
                    el.style.cursor = "pointer";
                    el.disabled = false;
                    el.classList.remove("is-disabled");
                }, binding.value || 2000); //默认2秒
            }
        });
    },
};